//
//  BaseViewController.m
//  CoachsBook
//
//  Created by huiyong li on 2022/8/18.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController


#pragma mark -视图即将出现
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    ((TabbarController *)self.tabBarController).tabBarView.hidden = YES;
    if (self.offset == 1) {
        [self getData];
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];
    if (self.fromVC) {
        [self.fromVC.view endEditing:YES];
    }
    [self setupUI];
}

- (void)setupUI {
    self.view.backgroundColor = [UIColor whiteColor];
    
    //隐藏头部view
    self.navigationController.navigationBar.hidden = YES;
    self.navgationheadv = [[NavigationHeadView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, SafeAreaTopHight)];
    self.navgationheadv.backgroundColor = [UIColor whiteColor];
    self.navgationheadv.titlelabel.text = @"";
    self.navgationheadv.titlelabel.textColor = [UIColor blackColor];
    [self.navgationheadv.backbtn addTarget:self action:@selector(returnback) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.navgationheadv];
}

-(void)getData
{
}

-(void)returnback{
    [self.navigationController popViewControllerAnimated:YES];
}



@end
